package com.platform.enumeration;

import org.apache.commons.lang.StringUtils;

/**
 * @author gzg
 */

public enum PopularityTypeEnum {
    /**
     * 受欢迎的类型美剧类
     */
    HOT_BRAND("1", "火爆招商品牌"),
    FRANCHISEE_RECOMMENDED_BRAND("2", "加盟商推荐品牌"),
    HIGN_INCOME("3", "高收益品牌");
    private String type;
    private String desc;

    PopularityTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String getPopularityDescByType(String type) {
        for (PopularityTypeEnum typeEnum : PopularityTypeEnum.values()) {
            if (StringUtils.equals(type, typeEnum.getType())) {
                return typeEnum.getDesc();
            }
        }
        return null;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
